{
  "groups": {
    "group": [
    {{foreach from=$groups item=gr name=fegroups}}
      {
        "id": "{{$gr->getId()}}",
        "title": "{{$gr->getName()}}"
      }
      
      {{if $smarty.foreach.fegroups.last}} {{else}},{{/if}}
      {{/foreach}}
    ]
  }
}